#ifndef _WMI_FILEDIRMANAGER_H
#define _WMI_FILEDIRMANAGER_H

/******************************************************************************
** @file	WMI_FileDirManager.h
** @author  Arturo Aguilar
** @author  Andrea Herbas
**
** @date	Aug 24, 2010
**
** @desc	WMI_FileDirManager class encapsules all the actions related to
**			the fileDirectory tree.
**
**
******************************************************************************/

#include <comdef.h>
#include <Wbemidl.h>
#include <string>
#include "wmi_result.h"
#include "wmi_connection.h"
#include "wmi_filedirectory.h"
#include "wmi_common.h"
#include "wmi_disk.h"

class SOEXPORT WMI_FileDirManager
{
public:
   /**
	* Class constructor
	*
	* @param wmi connnection used to access the properties of the
    * files and directories classes.
	*/
	WMI_FileDirManager(WMI_Connection* con);
	
    /**
    * Class destructor
    */
	~WMI_FileDirManager();

    /**
    * Given a specific path, this method returns a group of files and directories that
    * the parent directory contains.
    *
    * @param path from the files and directories will be retrieved.
    * @param fileDirList an output paramater, holds the resultant objects.
    */
	void getFileDirs(const wstring& path, WMI_Result<WMI_FileDirectory>& fileDirList);

    /**
    * Lists the logical drives in a pc. 
    *
    * @param drivesList an output parameter, holds the resultant objects.
    */
	void getLogicalDrives(WMI_Result<WMI_Disk>& drivesList);

    /**
    * Returns the parent folder name.
    *
    * @param path from the parent will be extracted.
    * @return the parent container name.
    */
	void getFileDirName(const wstring& path,wstring& outPath,wstring& outFileName);

    /**
    *
    */
    void WMI_FileDirManager::getFileDirName(const wstring& path, wstring& outFileName);

private:
	/**
	* Used to access file and directories classes.
	*/
	WMI_Connection* _con;

};

#endif